package com.gticket.orderservice.mapper;

import com.gticket.orderservice.pojo.Alipay;
import com.gticket.orderservice.pojo.Orders;
import org.apache.ibatis.annotations.Select;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Repository;

/**
 * @author 伴你时光尽头
 * @create 2019-11-25 12:13
 */
@Repository
public interface AlipayMapper {
    /**
     * 根据数据库名和电影院id查询对应电影院商家的alipay支付宝信息
     *
     * @param orders
     * @return
     */
    @Select("select * from ${databasename}.payment p left join ${databasename}.cinema c on p.cinema_id=c.cinema_id where p.cinema_id=#{cinema_id} and p.flag=0")
    public Alipay getAlipay(Orders orders);

}
